package net.xinqushi.io.output;

import java.io.BufferedOutputStream;
import java.io.FileDescriptor;
import java.io.FileOutputStream;
import java.io.IOException;

public class BufferedOutputStreamTest {
    public static void main(String[] args) throws IOException {
        FileOutputStream console = new FileOutputStream(FileDescriptor.out);

        BufferedOutputStream buffer_console = new BufferedOutputStream(console);

        buffer_console.write("im your father".getBytes());// buffer a char size , capacity is 8KB

        buffer_console.close(); // auto flush stream when method close invoked
    }
}
